//@noflow
import { createAction, createActions, handleActions, type ActionType } from 'redux-actions';
import Qs from 'qs';
export const REQUEST = 'REQUEST';
export const SUCCESS = 'SUCCESS';
export const FAILURE = 'FAILURE';
const statuses = [REQUEST, SUCCESS, FAILURE];

export const createSagaActionType = requestAction => {
    return {
        REQUEST: `${requestAction}/REQUEST`,
        SUCCESS: `${requestAction}/SUCCESS`,
        FAILURE: `${requestAction}/FAILURE`
    };
};
export const createSagaAction = (requestAction, type = undefined) => {
    switch (type) {
        case REQUEST:
            return () => {
                return createAction(createSagaActionType(requestAction).REQUEST);
            };
        case SUCCESS:
            return;
        case FAILURE:
            return;
        default:
            return () => {};
    }
};
type sagaActionType<p, m> = {
    type: string,
    payload: p,
    meta: m,
    error: boolean
};
